textview: Improve scroll-to-mark behavior
authorMatthias Clasen <mclasen@redhat.com>
Thu, 2 Dec 2021 00:35:11 +0000 (19:35 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 2 Dec 2021 00:35:11 +0000 (19:35 -0500)
commit67ad566188f7ca80dbf2769ee07fc1bcf14ac511
tree833ccc1cfaea0db2517515a83fbdb0f7f40f5ee8
parentdb46a8dd0636750d49573ca34f89da849aaccdc1
textview: Improve scroll-to-mark behavior

The idea of within-margin is to scroll as little
as possible to bring the mark within the margins
defined by the factor. The code was achieving
that when scrolling down, but not when scrolling
up. This change makes things symmetrical.

Fixes: #4325
gtk/gtktextview.c